package com.rdzn.mall.center.enums;

public enum CouponType {

    TYPE_0(0, "全场赠券"),
    TYPE_1(1, "会员赠券"),
    TYPE_2(2, "购物赠券"),
    TYPE_3(3, "注册赠券");

    public Integer CODE;

    public String VALUE;

     CouponType(Integer code, String value){
        this.CODE = code;
        this.VALUE = value;
    }

    public static CouponType get(Integer code){
         switch (code){
             case 0:
                 return TYPE_0;
             case 1:
                 return TYPE_1;
             case 2:
                 return TYPE_2;
             case 3:
                 return TYPE_3;
             default:
                 return TYPE_0;
         }
    }
}
